/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.palituxd.tools.swing;

import java.awt.Component;

/**
 *
 * @author pablojesus
 */
public class Swing {

    public static void setComponentsEnabled(java.awt.Container c, boolean en) {
        Component[] components = c.getComponents();
        for (Component comp : components) {
            if (comp instanceof java.awt.Container) {
                setComponentsEnabled((java.awt.Container) comp, en);
            }
            comp.setEnabled(en);
        }
    }
}
